<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<jsp:useBean id="loginUser" scope="session" type="nuc.pojo.User"/>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%pageContext.setAttribute("ctp",request.getContextPath());%>
<head>
    <title>更改资料</title>
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/toolbar/normalize.css" />
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/toolbar/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/toolbar/style.css">
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/tour/normalize.css" />
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/tour/demo.css" />
    <link rel="stylesheet" type="text/css" href="${ctp}/static/fonts/tour/font-awesome-4.2.0/css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/tour/menu_sideslide.css" />
    <link rel="stylesheet" type="text/css" href="${ctp}/static/css/img.css">

</head>
<body>
<div class="container">
    <div class="menu-wrap">
        <nav class="menu">
            <div class="icon-list">
                <a href="${ctp}/shopping/userInfo"><span><div id="divcss5"><img src="${ctp}/get/userImg/${loginUser.userName}" alt="头像" height="80" width="80"/></div>${loginUser.userName}</span></a>
                <a href="${ctp}/shopping/shoppingIndex"><i class="fa fa-fw fa-bar-chart-o"></i><span>主页</span></a>
                <a href="${ctp}/shopping/shoppingCart/${loginUser.userName}/false"><i class="fa fa-fw fa-star-o"></i><span>购物车</span></a>
                <a href="${ctp}/shopping/getUserOrder/unSent"><i class="fa fa-fw fa-bell-o"></i><span>订单</span></a>
                <a href="${ctp}/update/updateUserInfo"><i class="fa fa-fw fa-envelope-o"></i><span>修改信息</span></a>
                <a href="${ctp}/logOut"><i class="fa fa-fw fa-newspaper-o"></i><span>退出登录</span></a>
            </div>
        </nav>
        <button class="close-button" id="close-button">Close Menu</button>
    </div>
    <button class="menu-button" id="open-button">Open Menu</button>
    <div class="content-wrap">
        <div class="content">
            <div class="htmleaf-container">
                <header class="htmleaf-header">
                    <h1>在线鲜花 <span>足不出户就能送货上门</span></h1>
                </header>
                <%--@elvariable id="updateUser" type="nuc.pojo.User"--%>
                <div id="centralTable">
                    <form:form action="${ctp}/update/updateUser" method="post" enctype="multipart/form-data" modelAttribute="updateUser" autocomplete="true">
                        <div class="centralTable">
                            <table  border="1" cellpadding="5" cellspacing="0">
                                <tr>
                                    <th>UID</th>
                                    <td>${loginUser.userId}</td>
                                </tr>
                                <tr>
                                    <th>用户名</th>
                                    <td>${loginUser.userName}</td>
                                </tr>
                                <tr>
                                    <th>密码</th>
                                    <td><input type="password" name="password" value=${loginUser.password}></td>
                                </tr>
                                <tr>
                                    <th>用户身份</th>
                                    <td>${loginUser.role==false?"买家":"卖家"}</td>
                                </tr>
                                <tr>
                                    <th>邮箱</th>
                                    <td><input name="email" value=${loginUser.email}></td>
                                </tr>
                                <tr>
                                    <th>地址</th>
                                    <td><input type="text" name="address" value="${loginUser.address}"/></td>
                                </tr>
                                <tr>
                                    <th>头像</th>
                                    <td>
                                        <img src="${ctp}/get/userImg/${loginUser.userName}" alt="头像" height="80" width="80"/><br>
                                        <input type="file" name="img"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    <input type="submit" name="更新用户信息"/><br/>
                    </form:form>
                </div>
            </div>
        </div>
    </div><!-- /content-wrap -->
</div><!-- /container -->

<script src="${ctp}/static/js/tour/classie.js"></script>
<script src="${ctp}/static/js/tour/main.js"></script>
</body>
</html>
